package com.nuoyuan.wx.common.exception;

public class BizException extends RuntimeException{

    private static final long serialVersionUID = 1L;
    String errorCode;
    Object attach;

//    public BusinessException(String errorCode)
//    {
//        super(errorCode.getMsg());
//        this.errorCode = errorCode;
//    }

    public BizException(String errorCode, String message)
    {
        super(message);
        this.errorCode = errorCode;
    }

    public BizException(String errorCode, String message, Object attach)
    {
        super(message);
        this.errorCode = errorCode;
        this.attach = attach;
    }

    public String getErrorCode()
    {
        return errorCode;
    }

    public Object getAttach()
    {
        return attach;
    }
}
